package com.maidou.qiantai.exception.customizationException;


import com.maidou.qiantai.common.constant.HeritageSiteConstant;

/**
 * @Author maidou
 * @Date 2023/11/28 23:59
 */
public class VerificationCodeException extends RuntimeException{

    private Integer code = HeritageSiteConstant.ExceptionEum.SMS_CODE.getCode();;
    private String message = HeritageSiteConstant.ExceptionEum.SMS_CODE.getMsg();

    public VerificationCodeException(HeritageSiteConstant.ResultEnum refreshToken) {
        this.code = refreshToken.getCode();
        this.message = refreshToken.getMsg();
    }

    public Integer getCode(){
        return this.code;
    }

    public String getMessage(){
        return this.message;
    }


    public VerificationCodeException(HeritageSiteConstant.ExceptionEum exceptionEum) {
        this.code = exceptionEum.getCode();
        this.message = exceptionEum.getMsg();
    }

    public VerificationCodeException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public VerificationCodeException() {
    }

    public VerificationCodeException(String message) {
        this.message = message;
    }

}
